<#include "/ftl/lib/operations.ftl"/>
<div class="easyui-layout" fit="true">
	<div data-options="region:'center',split:true" >
		<div class="easyui-layout" fit="true" border="false">
			<div region="north"  style="padding:5px;border:1px solid #ddd; background-color: #f4f4f4" id="global_${action_id}"  >
			</div> 
			<div data-options="region:'center',split:true,border:false" style="height: 100px;" >
				<div class="easyui-panel" data-options="border:false,fit:true,href:'${request.contextPath}${namespace?default('')}/mp/eb/order-list.htm?action_id=${action_id}'" />
			</div>
		</div>
	</div>
</div>  
<div id="comments_dlg_${action_id}" title="${action.getText('state.change.title')}" style="width:450px;height:300px;padding:10px">
	<textarea style="height:150px;width:300px;resize: none;" class="easyui-validatebox" data-options="validType:'length[0,512]'"   ></textarea>
</div>
<script type="text/javascript">
	function putCar_${action_id}(data){
		$.messager.confirm('${action.getText('bg.message.warn')}', '是否确认提车', function(b) {
			if (b) {
				$.ajax({
					url : '${request.contextPath}${namespace?default('')}/mp/eb/order-putCar.json',
					data:{id : data.id},
					dataType : 'JSON',
					success : function(json) {
						$.messager.alert(json.title,json.msg,json.level);
						$("#datagrid_${action_id}").datagrid('reload');
					}
				});
			}
		});
	}
	
	function remarks_${action_id}(data){
		$('#comments_dlg_${action_id}').find('textarea').val('');
		$('#comments_dlg_${action_id}').dialog({
			width:350,   
			height:300,   
			modal : true,
			title : '添加备注',
			buttons : [ {
				text : '${action.getProperty('net.esj.background.message','bg.datagrid.edit')}',
				iconCls : 'icon-edit',
				handler : function() {
					var d = $(this).closest('.window-body');
					var st = $('#comments_dlg_${action_id}').find('textarea').val();
					$.ajax({
						url : '${request.contextPath}${namespace?default('')}/mp/eb/order-remarks.json',
						data:{id : data.id,remarks:st},
						dataType : 'JSON',
						success : function(json) {
							d.dialog('close');
							$.messager.alert(json.title,json.msg,json.level);
							$("#datagrid_${action_id}").datagrid('reload');
						}
					});
				}
			} ]
		});
	}
</script>
<@operations contextUri='order/order' />